import type { VNode, Ref } from "vue"

export interface INotificationProps {
  title: string,
  message: string | VNode,
  close: (el: HTMLElement | null | Ref<HTMLElement | null>) => void,
  duration: number, // 关闭时间,毫秒
  showClose: boolean
}

export type Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'

export interface INotificationResolved extends INotificationProps {
  position: Position,
  id: string,
  style: string,
  class: string,
}

export type INotificationOptions = {
  [prop in keyof INotificationResolved]?: INotificationResolved[prop]
}
